package com.yeqian.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;

/**
 * @Author : yeqian
 * @Date : 2020/12/28 14:51
 * <p>
 * 标签实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@Table(name = "tag")
public class Tag implements Serializable {

    /**
     * 标签id
     */
    @Id
    private Integer id;

    /**
     * 标签名
     */
    private String name;

    /**
     * 标签介绍
     */
    private String introduce;

    /**
     * 标签封面
     */
    private String img;

    /**
     * 标签中所对应的文章数量
     */
    @Transient
    private Integer articleCount;

}
